
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Models.Entity
{
    /// <summary>
    /// 每周课表
    /// </summary>
    [Table(@"c_teacher_course a 
             left join c_teacher b on a.teacher_id=b.teacher_id  
             left join c_course c on a.course_id=c.course_id  
             ")]
    public class CTeacherCourseEntityView : BaseModel
    {
        /// <summary>
        /// week_course_id
        /// </summary>
        [Key]
        [Column("a.teacher_course_id")]
        public int teacher_course_id { get; set; }

        /// <summary>
        /// week_course_id
        /// </summary>
        [Column("b.teacher_id")]
        public int teacher_id { get; set; }

        /// <summary>
        /// 教师名称
        /// </summary>
        [Required]
        [StringLength(20)]
        [Column("b.name")]
        public string teacher_name { get; set; }

        /// <summary>
        /// 课程名称
        /// </summary>
        [Required]
        [StringLength(20)]
        [Column("c.name")]
        public string course_name { get; set; }
    }
}
